<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopSalesmanDetail extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_salesman_detail', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('shopid')->comment('商家id');
            $table->string('shopusermobile')->default('')->comment('商家地推号码');
            $table->integer('shopuserid')->default(0)->comment('商家地推id');
            $table->string('type')->comment('类型：注册／消费');
            $table->string('mobile')->comment('注册号码');
            $table->string('ordernumber')->default('')->comment('订单号');
            $table->decimal('orderamount',16,2)->comment('订单金额');
            $table->dateTime('ordertime')->comment('订单时间');
            $table->decimal('getmoney', 16,2)->default(0.00)->comment('获取金额');
            $table->string('registersource')->default("默认")->comment('默认,本人,张三等');
            $table->integer('accountstatus')->default(0)->comment('结款状态');
            $table->decimal('accountamount', 16, 2)->default(0.00)->comment('结款金额');
            $table->dateTime('accounttime')->comment('结款时间');
            $table->integer('adminid')->default(1)->comment('操作人');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
